package com.ruoyi.web.schedule;

import com.ruoyi.web.service.impl.GxtNoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * description: 工信厅通知定时
 * auth fcb
 * date 2025-11-03 14:16
 **/
@Component
@Slf4j
public class GxtNoticeScheduled {

    @Autowired
    private GxtNoticeService gxtNoticeService;

    @Scheduled(cron = "0 10 1 ? * *")
    public void requestListPage1() {
        log.info("开始获取省工信厅文件--通知...");
        gxtNoticeService.getGxtNotice("通知", "1");
        log.info("获取省工信厅通知结束...");
    }

    @Scheduled(cron = "0 20 1 ? * *")
    public void requestListPage2() {
        log.info("开始获取省工信厅文件--公告...");
        gxtNoticeService.getGxtNotice("公告", "1");
        log.info("获取省工信厅公告结束...");
    }

    @Scheduled(cron = "0 30 1 ? * *")
    public void requestListPage3() {
        log.info("开始获取省工信厅文件--公示...");
        gxtNoticeService.getGxtNotice("公示", "1");
        log.info("获取省工信厅公示结束...");
    }

}
